﻿namespace array_demo.Model.Set
{
    public class BstSet1<E> : ISet<E> where E : IComparable
    {
        private Bst1<E> bst1;
        public BstSet1()
        {
            bst1 = new Bst1<E>();
        }

        public bool IsEmpty { get { return bst1.IsEmpty; } }

        public int Count { get { return bst1.Count; } }

        public void Add(E e)
        {
            bst1.AddV1(e);
        }

        public bool Contains(E e)
        {
            return bst1.Contains(e);
        }

        public void Remove(E e)
        {
             bst1.Del(e);
        }

        public int MaxHeight()
        {
            return bst1.MaxHeight();
        }
    }
}
